<div class="authbox">
  <% if logged_in? -%>
      <%= image_tag('user.png', :plugin => "ae_users") %>
      <%= link_to  logged_in_person.name, 
          :controller => 'account', :action => 'edit_profile' %>
      <% if logged_in_person.administrator? -%>
        |
        <%= image_tag "admin.png", :plugin => "ae_users" %>
        <%= link_to "Administration", :controller => 'permission', :action => 'admin' %>
      <% end -%>
      |
      <%= image_tag "logout.png", :plugin => "ae_users" %>
      <%= link_to "Log out", :controller => 'auth', :action => 'logout' %>
  <% else -%>
      <%= link_to "Log in", :controller => 'auth', :action => 'login', :return_to => url_for() %>
  <% end -%>
</div>